SetCSequencePrev
TheSetCSequencePrev
function allows the application to set the pixel map and boundary rectangle used by the previous frame in temporal compression. This is useful if the application that is compressing has multiple buffers and wants to update the previous frame by switching buffer pointers instead of copying the data. Usually, the Image Compression Manager allocates the previous buffer for temporal compression. Under normal circumstances, the compressor component or the Image Compression Manager updates the contents of the buffer by copying each frame into the buffer after it is compressed.This is a very specialized function--your application should not need to call it under most circumstances.
pascal OSErr SetCSequencePrev (ImageSequence seqID, PixMapHandle prev, const Rect *prevRect);
seqID
- Contains the unique sequence identifier that was returned by the
CompressSequenceBegin
function (described on page 3-100).prev
- Contains a handle to the new previous image buffer. The compressor uses this buffer to store a previous image against which the current image (stored in the buffer referred to by the
src
parameter to theCompressSequenceBegin
function) is compared when performing temporal compression. You must allocate this buffer using the same pixel depth and color table as the source image buffer that you specify with thesrc
parameter when you call theCompressSequenceBegin
function (described on page 3-100). The compressor manages the contents of this buffer based upon several considerations, such as the key frame rate and the degree of difference between compared images.prevRect
- Contains a pointer to a rectangle defining the portion of the previous image to use for temporal compression. The compressor uses this portion of the previous image as the basis of comparison with the current image. This rectangle must be the same size as the source rectangle you specify with the
srcRect
parameter to theCompressSequenceBegin
function. To get the boundary of a source pixel map, set this parameter tonil
.DESCRIPTION
When you start compressing a sequence, you may assign a previous frame buffer and rectangle with theprev
andprevRect
parameters to theCompressSequenceBegin
function, respectively. If you specified anil
value for theprev
parameter, the compressor allocates an offscreen buffer for the previous frame. In either case you may use this function to assign a new previous frame buffer.RESULT CODES
Memory Manager errors
noErr 0 No error paramErr -50 Invalid parameter specified